3.221 \(\int \cos ^2(c+d x) \sin ^2(a+b x) \, dx\)
Optimal. Leaf size=88 \[ -\frac{\sin (2 (a-c)+2 x (b-d))}{16 (b-d)}-\frac{\sin (2 (a+c)+2 x (b+d))}{16 (b+d)}-\frac{\sin (2 a+2 b x)}{8 b}+\frac{\sin (2 c+2 d x)}{8 d}+\frac{x}{4} \]
[Out]
x/4 - Sin[2*a + 2*b*x]/(8*b) - Sin[2*(a - c) + 2*(b - d)*x]/(16*(b - d)) + Sin[2*c + 2*d*x]/(8*d) - Sin[2*(a +
c) + 2*(b + d)*x]/(16*(b + d))
________________________________________________________________________________________
Rubi [A] time = 0.067894, antiderivative size = 88, normalized size of antiderivative = 1.,
number of steps used = 6, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118, Rules used =
{4574, 2637} \[ -\frac{\sin (2 (a-c)+2 x (b-d))}{16 (b-d)}-\frac{\sin (2 (a+c)+2 x (b+d))}{16 (b+d)}-\frac{\sin (2 a+2 b x)}{8 b}+\frac{\sin (2 c+2 d x)}{8 d}+\frac{x}{4} \]
Antiderivative was successfully verified.
[In]
Int[Cos[c + d*x]^2*Sin[a + b*x]^2,x]
[Out]
x/4 - Sin[2*a + 2*b*x]/(8*b) - Sin[2*(a - c) + 2*(b - d)*x]/(16*(b - d)) + Sin[2*c + 2*d*x]/(8*d) - Sin[2*(a +
c) + 2*(b + d)*x]/(16*(b + d))
Rule 4574
Int[Cos[w_]^(q_.)*Sin[v_]^(p_.), x_Symbol] :> Int[ExpandTrigReduce[Sin[v]^p*Cos[w]^q, x], x] /; IGtQ[p, 0] &&
IGtQ[q, 0] && ((PolynomialQ[v, x] && PolynomialQ[w, x]) || (BinomialQ[{v, w}, x] && IndependentQ[Cancel[v/w],
x]))
Rule 2637
Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Rubi steps
\begin{align*} \int \cos ^2(c+d x) \sin ^2(a+b x) \, dx &=\int \left (\frac{1}{4}-\frac{1}{4} \cos (2 a+2 b x)-\frac{1}{8} \cos (2 (a-c)+2 (b-d) x)+\frac{1}{4} \cos (2 c+2 d x)-\frac{1}{8} \cos (2 (a+c)+2 (b+d) x)\right ) \, dx\\ &=\frac{x}{4}-\frac{1}{8} \int \cos (2 (a-c)+2 (b-d) x) \, dx-\frac{1}{8} \int \cos (2 (a+c)+2 (b+d) x) \, dx-\frac{1}{4} \int \cos (2 a+2 b x) \, dx+\frac{1}{4} \int \cos (2 c+2 d x) \, dx\\ &=\frac{x}{4}-\frac{\sin (2 a+2 b x)}{8 b}-\frac{\sin (2 (a-c)+2 (b-d) x)}{16 (b-d)}+\frac{\sin (2 c+2 d x)}{8 d}-\frac{\sin (2 (a+c)+2 (b+d) x)}{16 (b+d)}\\ \end{align*}
Mathematica [A] time = 0.781524, size = 108, normalized size = 1.23 \[ \frac{\left (2 d^3-2 b^2 d\right ) \sin (2 (a+b x))-b d (b+d) \sin (2 (a+x (b-d)-c))+b (b-d) (-d \sin (2 (a+x (b+d)+c))+2 (b+d) \sin (2 (c+d x))+4 d x (b+d))}{16 b d (b-d) (b+d)} \]
Antiderivative was successfully verified.
[In]
Integrate[Cos[c + d*x]^2*Sin[a + b*x]^2,x]
[Out]
((-2*b^2*d + 2*d^3)*Sin[2*(a + b*x)] - b*d*(b + d)*Sin[2*(a - c + (b - d)*x)] + b*(b - d)*(4*d*(b + d)*x + 2*(
b + d)*Sin[2*(c + d*x)] - d*Sin[2*(a + c + (b + d)*x)]))/(16*b*(b - d)*d*(b + d))
________________________________________________________________________________________
Maple [A] time = 0.028, size = 83, normalized size = 0.9 \begin{align*}{\frac{x}{4}}-{\frac{\sin \left ( 2\,bx+2\,a \right ) }{8\,b}}+{\frac{\sin \left ( 2\,dx+2\,c \right ) }{8\,d}}-{\frac{\sin \left ( \left ( 2\,b-2\,d \right ) x-2\,c+2\,a \right ) }{16\,b-16\,d}}-{\frac{\sin \left ( \left ( 2\,b+2\,d \right ) x+2\,a+2\,c \right ) }{16\,b+16\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(cos(d*x+c)^2*sin(b*x+a)^2,x)
[Out]
1/4*x-1/8*sin(2*b*x+2*a)/b+1/8*sin(2*d*x+2*c)/d-1/16/(b-d)*sin((2*b-2*d)*x-2*c+2*a)-1/16/(b+d)*sin((2*b+2*d)*x
+2*a+2*c)
________________________________________________________________________________________
Maxima [B] time = 1.21011, size = 837, normalized size = 9.51 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^2*sin(b*x+a)^2,x, algorithm="maxima")
[Out]
1/32*(8*((b*cos(2*c)^2 + b*sin(2*c)^2)*d^3 - (b^3*cos(2*c)^2 + b^3*sin(2*c)^2)*d)*x - (b^2*d*sin(2*c) - b*d^2*
sin(2*c))*cos(2*(b + d)*x + 2*a + 4*c) + (b^2*d*sin(2*c) - b*d^2*sin(2*c))*cos(2*(b + d)*x + 2*a) + (b^2*d*sin
(2*c) + b*d^2*sin(2*c))*cos(-2*(b - d)*x - 2*a + 4*c) - (b^2*d*sin(2*c) + b*d^2*sin(2*c))*cos(-2*(b - d)*x - 2
*a) - 2*(b^2*d*sin(2*c) - d^3*sin(2*c))*cos(2*b*x + 2*a + 2*c) + 2*(b^2*d*sin(2*c) - d^3*sin(2*c))*cos(2*b*x +
2*a - 2*c) - 2*(b^3*sin(2*c) - b*d^2*sin(2*c))*cos(2*d*x) + 2*(b^3*sin(2*c) - b*d^2*sin(2*c))*cos(2*d*x + 4*c
) + (b^2*d*cos(2*c) - b*d^2*cos(2*c))*sin(2*(b + d)*x + 2*a + 4*c) + (b^2*d*cos(2*c) - b*d^2*cos(2*c))*sin(2*(
b + d)*x + 2*a) - (b^2*d*cos(2*c) + b*d^2*cos(2*c))*sin(-2*(b - d)*x - 2*a + 4*c) - (b^2*d*cos(2*c) + b*d^2*co
s(2*c))*sin(-2*(b - d)*x - 2*a) + 2*(b^2*d*cos(2*c) - d^3*cos(2*c))*sin(2*b*x + 2*a + 2*c) + 2*(b^2*d*cos(2*c)
- d^3*cos(2*c))*sin(2*b*x + 2*a - 2*c) - 2*(b^3*cos(2*c) - b*d^2*cos(2*c))*sin(2*d*x) - 2*(b^3*cos(2*c) - b*d
^2*cos(2*c))*sin(2*d*x + 4*c))/((b*cos(2*c)^2 + b*sin(2*c)^2)*d^3 - (b^3*cos(2*c)^2 + b^3*sin(2*c)^2)*d)
________________________________________________________________________________________
Fricas [A] time = 0.508512, size = 246, normalized size = 2.8 \begin{align*} \frac{{\left (2 \, b d^{2} \cos \left (b x + a\right )^{2} + b^{3} - 2 \, b d^{2}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (b^{3} d - b d^{3}\right )} x -{\left (2 \, b^{2} d \cos \left (b x + a\right ) \cos \left (d x + c\right )^{2} - d^{3} \cos \left (b x + a\right )\right )} \sin \left (b x + a\right )}{4 \,{\left (b^{3} d - b d^{3}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^2*sin(b*x+a)^2,x, algorithm="fricas")
[Out]
1/4*((2*b*d^2*cos(b*x + a)^2 + b^3 - 2*b*d^2)*cos(d*x + c)*sin(d*x + c) + (b^3*d - b*d^3)*x - (2*b^2*d*cos(b*x
+ a)*cos(d*x + c)^2 - d^3*cos(b*x + a))*sin(b*x + a))/(b^3*d - b*d^3)
________________________________________________________________________________________
Sympy [A] time = 151.378, size = 1027, normalized size = 11.67 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)**2*sin(b*x+a)**2,x)
[Out]
Piecewise((x*sin(a)**2*cos(c)**2, Eq(b, 0) & Eq(d, 0)), ((x*sin(c + d*x)**2/2 + x*cos(c + d*x)**2/2 + sin(c +
d*x)*cos(c + d*x)/(2*d))*sin(a)**2, Eq(b, 0)), (x*sin(a - d*x)**2*sin(c + d*x)**2/8 + 3*x*sin(a - d*x)**2*cos(
c + d*x)**2/8 + x*sin(a - d*x)*sin(c + d*x)*cos(a - d*x)*cos(c + d*x)/2 + 3*x*sin(c + d*x)**2*cos(a - d*x)**2/
8 + x*cos(a - d*x)**2*cos(c + d*x)**2/8 + sin(a - d*x)**2*sin(c + d*x)*cos(c + d*x)/(8*d) + sin(a - d*x)*cos(a
- d*x)*cos(c + d*x)**2/(2*d) + 3*sin(c + d*x)*cos(a - d*x)**2*cos(c + d*x)/(8*d), Eq(b, -d)), (x*sin(a + d*x)
**2*sin(c + d*x)**2/8 + 3*x*sin(a + d*x)**2*cos(c + d*x)**2/8 - x*sin(a + d*x)*sin(c + d*x)*cos(a + d*x)*cos(c
+ d*x)/2 + 3*x*sin(c + d*x)**2*cos(a + d*x)**2/8 + x*cos(a + d*x)**2*cos(c + d*x)**2/8 + sin(a + d*x)**2*sin(
c + d*x)*cos(c + d*x)/(8*d) - sin(a + d*x)*cos(a + d*x)*cos(c + d*x)**2/(2*d) + 3*sin(c + d*x)*cos(a + d*x)**2
*cos(c + d*x)/(8*d), Eq(b, d)), ((x*sin(a + b*x)**2/2 + x*cos(a + b*x)**2/2 - sin(a + b*x)*cos(a + b*x)/(2*b))
*cos(c)**2, Eq(d, 0)), (b**3*d*x*sin(a + b*x)**2*sin(c + d*x)**2/(4*b**3*d - 4*b*d**3) + b**3*d*x*sin(a + b*x)
**2*cos(c + d*x)**2/(4*b**3*d - 4*b*d**3) + b**3*d*x*sin(c + d*x)**2*cos(a + b*x)**2/(4*b**3*d - 4*b*d**3) + b
**3*d*x*cos(a + b*x)**2*cos(c + d*x)**2/(4*b**3*d - 4*b*d**3) + b**3*sin(a + b*x)**2*sin(c + d*x)*cos(c + d*x)
/(4*b**3*d - 4*b*d**3) + b**3*sin(c + d*x)*cos(a + b*x)**2*cos(c + d*x)/(4*b**3*d - 4*b*d**3) - 2*b**2*d*sin(a
+ b*x)*cos(a + b*x)*cos(c + d*x)**2/(4*b**3*d - 4*b*d**3) - b*d**3*x*sin(a + b*x)**2*sin(c + d*x)**2/(4*b**3*
d - 4*b*d**3) - b*d**3*x*sin(a + b*x)**2*cos(c + d*x)**2/(4*b**3*d - 4*b*d**3) - b*d**3*x*sin(c + d*x)**2*cos(
a + b*x)**2/(4*b**3*d - 4*b*d**3) - b*d**3*x*cos(a + b*x)**2*cos(c + d*x)**2/(4*b**3*d - 4*b*d**3) - 2*b*d**2*
sin(a + b*x)**2*sin(c + d*x)*cos(c + d*x)/(4*b**3*d - 4*b*d**3) + d**3*sin(a + b*x)*sin(c + d*x)**2*cos(a + b*
x)/(4*b**3*d - 4*b*d**3) + d**3*sin(a + b*x)*cos(a + b*x)*cos(c + d*x)**2/(4*b**3*d - 4*b*d**3), True))
________________________________________________________________________________________
Giac [A] time = 1.12695, size = 108, normalized size = 1.23 \begin{align*} \frac{1}{4} \, x - \frac{\sin \left (2 \, b x + 2 \, d x + 2 \, a + 2 \, c\right )}{16 \,{\left (b + d\right )}} - \frac{\sin \left (2 \, b x - 2 \, d x + 2 \, a - 2 \, c\right )}{16 \,{\left (b - d\right )}} - \frac{\sin \left (2 \, b x + 2 \, a\right )}{8 \, b} + \frac{\sin \left (2 \, d x + 2 \, c\right )}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^2*sin(b*x+a)^2,x, algorithm="giac")
[Out]
1/4*x - 1/16*sin(2*b*x + 2*d*x + 2*a + 2*c)/(b + d) - 1/16*sin(2*b*x - 2*d*x + 2*a - 2*c)/(b - d) - 1/8*sin(2*
b*x + 2*a)/b + 1/8*sin(2*d*x + 2*c)/d